import db from '~~/DB';
import { defineResponseResolver } from '~~/mocks/define';
import { validateMenu } from '~~/mocks/middleware/menu';

export default validateMenu('system-user-uid', async (req, res, ctx) => {
  const uid = Number(req.params.uid);
  const user = await db.users.get(uid);
  return res(ctx.json({ ...user }));
});
